<div class="form">
<?php $form = $this
	->beginWidget('CActiveForm',
		array(
			'id' => 'employee-certificate-form',
			'enableAjaxValidation' => false,
			'htmlOptions' => array(
				'enctype' => 'multipart/form-data'
			)
		));
?>

	<p class="note">带 <span class="required">*</span> 的是必填的哦！</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model, 'grantDate'); ?>
		<?php $this
			->widget('zii.widgets.jui.CJuiDatePicker',
				array(
					'model' => $model,
					'attribute' => 'grantDate',
				));
		?>
		<?php echo $form->error($model, 'grantDate'); ?>
	</div>
<div class="row">
		<?php echo $form->labelEx($model, 'educateDate'); ?>
		<?php $this
			->widget('zii.widgets.jui.CJuiDatePicker',
				array(
					'model' => $model,
					'attribute' => 'educateDate',
				));
		?>
		<?php echo $form->error($model, 'educateDate'); ?>
	</div><div class="row">
		<?php echo $form->labelEx($model, 'extendDate'); ?>
		<?php $this
			->widget('zii.widgets.jui.CJuiDatePicker',
				array(
					'model' => $model,
					'attribute' => 'extendDate',
				));
		?>
		<?php echo $form->error($model, 'extendDate'); ?>
	</div><div class="row">
		<?php echo $form->labelEx($model, 'expireDate'); ?>
		<?php $this
			->widget('zii.widgets.jui.CJuiDatePicker',
				array(
					'model' => $model,
					'attribute' => 'expireDate',
				));
		?>
		<?php echo $form->error($model, 'expireDate'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model, 'summary'); ?>
		<?php echo $form
			->textField($model, 'summary', array(
				'size' => 60,
				'maxlength' => 255
			));
		?>
		<?php echo $form->error($model, 'summary'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'note'); ?>
		<?php echo $form
			->textField($model, 'note', array(
				'size' => 60,
				'maxlength' => 255
			));
		?>
		<?php echo $form->error($model, 'note'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'typeId'); ?>
		<?php echo $form
			->dropDownList($model, 'typeId', EmployeeCertificate::getTypes(),
				array(
					'empty' => ''
				));
		?>
		<?php echo $form->error($model, 'typeId'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'imagePath'); ?>
		<?php echo $form->fileField($model, 'imagePath'); ?>
		<?php echo $form->error($model, 'imagePath'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '添加' : '保存'); ?>
	</div>
<?php $this->endWidget(); ?>

</div><!-- form -->
